package com.pet.common.domain;

public class UserContext {
    private static final ThreadLocal<Integer> tl = new ThreadLocal<>();

    public static void setUser(Integer userId) {
        tl.set(userId);
    }

    public static Integer getUser() {
        return tl.get();
    }

    public static void removeUser() {
        tl.remove();
    }
}
